package com.house.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author: GGP
 * @description: 订单实体类
 * @time: 2023-04-16 10:50
 **/
@Getter
@Setter
@Entity
@Table(name = "bill")
@ApiModel
public class Bill extends CommonProperties{

	/** 订单号 */
	@Column(name = "bill_number")
	@ApiModelProperty(value = "订单号",name = "billNumber",required = true)
	private String billNumber;

	/** 用户id */
	@Column(name = "user_id")
	@ApiModelProperty(value = "用户id",name = "userId",required = true)
	private Integer userId;

	/** 房源id */
	@Column(name = "house_id")
	@ApiModelProperty(value = "房源id",name = "houseId",required = true)
	private Integer houseId;

	/** 房间id */
	@Column(name = "room_id")
	@ApiModelProperty(value = "房间id",name = "roomId0",required = true)
	private Integer roomId ;

	/** 价格 */
	@Column(name = "price")
	@ApiModelProperty(value = "价格",name = "price",required = true)
	private Integer price;

	/** 手机号 */
	@Column(name = "phone")
	@ApiModelProperty(value = "手机号",name = "phone",required = true)
	private String phone;

	/** 姓名 */
	@Column(name = "uname")
	@ApiModelProperty(value = "姓名",name = "uname",required = true)
	private String uname;

	/** 身份证号 */
	@Column(name = "idcard")
	@ApiModelProperty(value = "身份证号",name = "idCard",required = true)
	private String idCard;

	/** 入住日期 */
	@Column(name = "check_in_time")
	@ApiModelProperty(value = "入住日期",name = "checkInTime",required = true)
	private Date checkInTime;

	/** 离店日期 */
	@Column(name = "check_out_time")
	@ApiModelProperty(value = "离店日期",name = "checkOutTime",required = true)
	private Date checkOutTime;

	/** 订单状态 （1:已预订 2:已入住 3:已退房 4:已完成）点击已完成时将此房间号*/
	@Column(name = "status")
	@ApiModelProperty(value = "订单状态",name = "status",required = true)
	private Integer status;

	/** 下单时间 */
	@Column(name = "bill_time")
	@CreatedDate
	@ApiModelProperty(value = "下单时间",name = "billTime",required = true)
	private Date billTime;

	/** 客户评分 */
	@Column(name = "score")
	@ApiModelProperty(value = "评分",name = "score",required = true)
	private Integer score;

}
